<?php
	session_start();
	
	unset($_SESSION['opcion']);
	if ( !isset($_SESSION['opcion']) ) {
		$_SESSION['opcion'] = 2;
	} 
	
	include_once('../includes/encabezado.php');
?>
  
            
                <td width="100%" valign="top" class="rightcolumn" valign="middle" height="500px">
                	<br/>
                    <table width="90%" align="center" cellpadding="0" cellspacing="0">
                          	<tr>
                            	<td valign="top">
                                	<table width="100%" align="center" cellpadding="0" cellspacing="0">
                                		<tr>
                                 			<td height="43" align="left" valign="top" class="leftcolumn">
                                            	<div align="left">
                                                	<img src="../../publicos/imagenes/pagina/titlebar.gif" editor="Webstyle4" moduleid="intranet_mytcalvo_index (Project)\../../publicos/imagenes/pagina/titlebar.xws" border="0" />
                                                </div>
                                           	</td>
                                            <td valign="top">
                                            	<img src="../../publicos/imagenes/pagina/spacer.gif" editor="Webstyle4" moduleid="intranet_mytcalvo_index (Project)\../../publicos/imagenes/pagina/spacer.xws" border="0" />
                                          	</td>
                                          	<td width="100%" valign="top" class="hnavbg">
                                            	<img src="../../publicos/imagenes/pagina/modificar_heading.gif" editor="Webstyle4" moduleid="intranet_mytcalvo_index (Project)\../../publicos/imagenes/pagina/buscar_heading.xws" border="0" />
                                          	</td>
                                          	<td valign="top" class="rightcolumn">
                                            	<img src="../../publicos/imagenes/pagina/top_right.gif" editor="Webstyle4" moduleid="intranet_mytcalvo_index (Project)\../../publicos/imagenes/pagina/top_right.xws" border="0" />
                                          	</td>
                                		</tr>
                              		</table> 
                              	</td>
                          	</tr>
                            
                            <tr>
                            	<td class="rightcolumn">
                                	<table width="100%" cellspacing="0" cellpadding="0">
                                    	<form action="../../controladores/articulo_controller.php?op=0" method="post">
                                            <tr>
                                                <td class="leftcolumn" colspan="2">
                                                    <br/>
                                                </td>						
                                            </tr>
                                            <tr>
                                                <td class="fondo" colspan="2" align="center"><b>Parametros de Consulta</b></td>
                                            </tr>
                                            <tr>
                                                <td class="leftcolumn" colspan="2">
                                                    <br/>
                                                </td>						
                                            </tr>
                                            <tr>
                                                <td class="leftcolumn1" align="right">
                                                    <a class="info" href="#" tabindex="-1">&nbsp;*&nbsp;<span>Campo Obligatorio</span></a>
                                                    Tipo de Art&iacute;culo:
                                                </td>
                                                <td class="paneltext" align="left">
                                                    <select id="id_tipo_articulo" name="id_tipo_articulo" onchange="javascript:actualizar_subtipo_articulos(this.value, 1); return false;">				
                                                        <option value="">SELECCIONE</option>						 
                                                        <?php 
                                                            $i = 0;
                                                            $lista_tipo_articulos = $_SESSION['lista_tipo_articulos'];	
                                                            while ($i < sizeof($lista_tipo_articulos)){
                                                                echo '<option value="'.$lista_tipo_articulos[$i][0].'">'.$lista_tipo_articulos[$i][0]." - ".$lista_tipo_articulos[$i][1].'</option>';
                                                                $i++;
                                                            }
                                                        ?>
                                                    </select> 
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="leftcolumn" colspan="2">
                                                    <br/>
                                                </td>						
                                            </tr>
                                            <tr>
                                                <td class="leftcolumn1" align="right">
                                                    <a class="info" href="#" tabindex="-1">&nbsp;*&nbsp;<span>Campo Obligatorio</span></a>
                                                    SubTipo de Art&iacute;culo:
                                                </td>
                                                <td class="paneltext" align="left">
                                                    <div id="div_subtipo_articulo">
                                                        <select id="id_subtipo_articulo" name="id_subtipo_articulo" onchange="javascript:actualizar_aticulos(document.getElementById('id_tipo_articulo').value, this.value, 1); return false;">
                                                            <option value="">SELECCIONE</option>
                                                        </select>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="leftcolumn" colspan="2">
                                                    <br/>
                                                </td>						
                                            </tr>
                                            <tr>
                                                <td class="leftcolumn1" align="right" width="43%">
                                                    <a class="info" href="#" tabindex="-1">&nbsp;*&nbsp;<span>Campo Obligatorio</span></a>
                                                    ID Variedad:
                                                </td>
                                                <td class="paneltext" align="left" width="57%">
                                                    <div id="div_id_articulo">
                                                        <select id="id_articulo" name="id_articulo">
                                                            <option value="">SELECCIONE</option>
                                                        </select>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="leftcolumn" colspan="2" align="center"><br/>
                                                    <input id="consultar_a" value="Consultar" type="submit" onClick="javascript:consulta_modificar_articulo(this.form); return false;">					
                                                </td>
                                            </tr>
                                        </tbody>
                                    </form>
                                </table> 
                      		</td>
                        </tr>
                                     
                        <tr>
                            <td class="rightcolumn" colspan="2">
                                <table width="100%" cellspacing="0" cellpadding="0">
                                    <form action="../../controladores/articulo_controller.php?op=6" method="post">
                                        <tbody>
                                        <tr>
                                            <td class="leftcolumn" colspan="2">
                                                <br/>
                                            </td>						
                                        </tr>
                                        
                                        <tr>
                                            <td class="fondo" colspan="2" align="center"><b>Modificar Art&iacute;culos</b></td>
                                        </tr>
                                        <tr>
                                            <td class="leftcolumn" colspan="2">
                                                <br/>
                                            </td>						
                                        </tr>                                        
                                        <tr>
                                            <td class="leftcolumn1" align="right" width="43%">
                                                ID Art&iacute;culo:
                                            </td>
                                            <td class="paneltext" align="left" width="57%">
                                                <?php
													$info_articulo = $_SESSION['info_articulo'];
													echo '<input id="id_articulo_m" name="id_articulo_m" size="21" maxlength="100" readonly="readonly" type="text" value="'.$info_articulo[0].$info_articulo[1].$info_articulo[2].'">';
												?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="leftcolumn" colspan="2">
                                                <br/>
                                            </td>						
                                        </tr>                                        
                                        <tr>
                                            <td class="leftcolumn1" align="right" width="43%">
                                                <a class="info" href="#" tabindex="-1">&nbsp;*&nbsp;<span>Campo Obligatorio</span></a>
                                                Nombre:
                                            </td>
                                            <td class="paneltext" align="left" width="57%">
                                                <?php
													$info_articulo = $_SESSION['info_articulo'];
													echo '<input id="nombre" name="nombre" size="21" maxlength="100" type="text" value="'.$info_articulo[3].'" onChange="convertir_Mayusculas(this)">';
												?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="leftcolumn" colspan="2">
                                                <br/>
                                            </td>						
                                        </tr>
                                        <tr>
                                            <td class="leftcolumn1" align="right">
                                                <a class="info" href="#" tabindex="-1">&nbsp;*&nbsp;<span>Campo Obligatorio</span></a>
                                                Descripci&oacute;n:
                                            </td>
                                            <td class="paneltext" align="left">							
                                                <?php
													$info_articulo = $_SESSION['info_articulo'];
													echo '<textarea id="descripcion" name="descripcion" rows="2" cols="65" onChange="convertir_Mayusculas(this)">'.$info_articulo[4].'</textarea>';
												?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="leftcolumn" colspan="2">
                                                <br/>
                                            </td>						
                                        </tr>
                                        <tr>
                                            <td class="leftcolumn1" align="right" width="43%">
                                                <a class="info" href="#" tabindex="-1">&nbsp;*&nbsp;<span>Campo Obligatorio</span></a>
                                                Medidas:
                                            </td>
                                            <td class="paneltext" align="left" width="57%">
                                                <?php
													$info_articulo = $_SESSION['info_articulo'];
													echo '<input id="medidas" name="medidas" size="21" maxlength="100" type="text" value="'.$info_articulo[5].'" onChange="convertir_Mayusculas(this)">';
												?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="leftcolumn" colspan="2">
                                                <br/>
                                            </td>						
                                        </tr>
                                        <tr>
                                            <td class="leftcolumn1" align="right" width="43%">
                                                <a class="info" href="#" tabindex="-1">&nbsp;*&nbsp;<span>Campo Obligatorio</span></a>
                                                Precio:
                                            </td>
                                            <td class="paneltext" align="left" width="57%">
                                                <?php
													$info_articulo = $_SESSION['info_articulo'];
													echo '<input id="precio" name="precio" size="21" maxlength="100" type="text" value="'.$info_articulo[6].'" onChange="convertir_Mayusculas(this)">';
												?>
                                                &nbsp;BsF. - Fecha Modificaci&oacute;n: 
                                                <?php
													echo $_SESSION['fecha_variable_precio'];
												?>
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td class="leftcolumn" colspan="2">
                                                <br/>
                                            </td>						
                                        </tr>
                                        
                                        <tr>
                                            <td class="leftcolumn" style="color:#3C9BF7" align="center" colspan="2">
                                                * Campo Obligatorio
                                            </td>						
                                        </tr>
                                        <tr>
                                        	<td class="leftcolumn" align="center" colspan="2"><br/>
                                                <input id="modificar_a" value="Modificar" type="submit" onClick="javascript:modificar_articulo(this.form); return false;">
                                                <input id="borrar_a" value="Borrar" type="reset">
                                                <input id="cancelar_a" value="Cancelar" type="button" onClick="parent.location='../ayuda/cancelar_operaciones.php'">
                                            </td>
                                        </tr>
                                        </form>
                              		</table>                                    
                              	</td>
                          	</tr>
                          	<tr>
                            	<td valign="top">
                            		<table width="100%" cellspacing="0" cellpadding="0">
                                		<tr>
                                            <td width="55" valign="top">
                                                <img src="../../publicos/imagenes/pagina/bottom_left2.gif" editor="Webstyle4" moduleid="intranet_mytcalvo_index (Project)\../../publicos/imagenes/pagina/bottom_left2.xws" border="0" />
                                            </td>
                                            <td valign="top" class="footer">&nbsp;
                                                
                                            </td>
                                            <td width="55" valign="top">
                                                <img src="../../publicos/imagenes/pagina/bottom_right.gif" editor="Webstyle4" moduleid="intranet_mytcalvo_index (Project)\../../publicos/imagenes/pagina/bottom_right.xws" border="0" />
                                            </td>
                                		</tr>
                              		</table>
                              	</td>
                          	</tr>
                        </tbody>
                    </table>
                    <br/>
                     
                </td>
            </tr>
            
<?php
	include_once('../includes/pie.php'); 
?>